package com.daxiong.hfs;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

import com.daxiong.hfs.bean.MainBean;
import com.daxiong.hfs.constant.Constant;
import com.daxiong.hfs.util.CommonUtil;

public class DetailActivity extends Activity {

	private MainBean mainBean;

	private TextView qualifiedId;

	private TextView chineseName;

	private TextView date;

	private TextView company;

	private TextView status;

	private TextView content;

	private TextView effect;

	private TextView declare;

	private TextView warnings;

	private TextView precautions;

	@Override
	public void onCreate(final Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.detail_layout);

		mainBean = //
		(MainBean) //
		CommonUtil.getSerializable(getIntent(), Constant.MAIN_BEAN_KEY);

		qualifiedId = (TextView) findViewById(R.id.qualified_id_contents);
		chineseName = (TextView) findViewById(R.id.chinese_name_contents);
		date = (TextView) findViewById(R.id.date_contents);
		company = (TextView) findViewById(R.id.company_contents);
		status = (TextView) findViewById(R.id.status_contents);
		content = (TextView) findViewById(R.id.content_contents);
		effect = (TextView) findViewById(R.id.effect_contents);
		declare = (TextView) findViewById(R.id.declare_contents);
		warnings = (TextView) findViewById(R.id.warnings_contents);
		precautions = (TextView) findViewById(R.id.precautions_contents);

		qualifiedId.setText(mainBean.getSelect().getQualifiedId());
		chineseName.setText(mainBean.getSelect().getChineseName());
		date.setText(mainBean.getSelect().getDate());
		company.setText(mainBean.getSelect().getCompany());
		status.setText(mainBean.getSelect().getStatus());
		content.setText(mainBean.getSelect().getContent());
		effect.setText(mainBean.getSelect().getEffect());
		declare.setText(mainBean.getSelect().getDeclare());
		warnings.setText(mainBean.getSelect().getWarnings());
		precautions.setText(mainBean.getSelect().getPrecautions());
	}

}
